package com.aiti.lulian.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * <p>
 * 工信门户首页
 * </p>
 *
 * @author 
 * @since 2025-06-18
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("show_card_banner")
public class ShowCardBanner implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "base_id", type = IdType.ASSIGN_ID)
    private String baseId;

    /**
     * 最新资讯标题
     */
    @TableField("base_name")
    @Size(max = 18, message = "最新资讯名称不能超过18个字")
    private String baseName;

    /**
     * 首页banner图
     */
    @TableField("banner_pic")
    @NotBlank(message = "首页banner图不能为空")
    private String bannerPic;

    /**
     * 资讯正文
     */
    @TableField("content")
    private String content;

    /**
     * 省份
     */
    @TableField("province")
    private String province;

    /**
     * 城市
     */
    @TableField("city")
    private String city;

    /**
     * 区县
     */
    @TableField("county")
    private String county;

    /**
     * 创建者
     */
    @TableField("creator")
    private String creator;

    /**
     * 更新者
     */
    @TableField("update_by")
    private String updateBy;

    /**
     * 创建时间
     */
    @TableField(value = "base_create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date baseCreateTime;

    /**
     * 更新时间
     */
    @TableField(value = "base_update_time", fill = FieldFill.UPDATE)
    private Date baseUpdateTime;

    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableField("is_delete")
    private Boolean isDelete;
}
